# Maintainer: Shuanglei Tao <tsl0922@gmail.com>

pkgname=json-c
pkgver=0.13.1
pkgrel=1
pkgdesc="A JSON implementation in C"
arch=('i686' 'x86_64')
url="https://github.com/json-c/json-c"
license=('MIT')
makedepends=('gcc' 'make' 'autoconf')
source=("https://s3.amazonaws.com/json-c_releases/releases/${pkgname}-${pkgver}.tar.gz")
sha256sums=('b87e608d4d3f7bfdd36ef78d56d53c74e66ab278d318b71e6002a369d36f4873')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --enable-shared \
    --enable-static
  make
}

package() {
  options=('staticlibs')
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR="$pkgdir" install
}